<template>
  <div class="cart">
    <nav-bar class="nav-bar">
      <div slot="center">购物车({{length}})</div>
    </nav-bar>
    <scroll class="content">
      <cart-list/>
    </scroll>
    <CartBottomBar/>
  </div>
</template>

<script>
  import CartBottomBar from "./childComps/CartBottomBar";
  import CartList from "./childComps/CartList";

  import Scroll from "components/common/scroll/Scroll";
  import NavBar from "components/common/navbar/NavBar";

  import {mapGetters} from "vuex";

  export default {
    name: "Cart",
    components: {CartBottomBar, CartList, NavBar, Scroll},
    computed: {
      ...mapGetters({
        length: 'cartLength'
      })
    }
  }
</script>

<style scoped>
  .cart {

  }

  .nav-bar {
    background-color: var(--color-tint);
    color: #ffffff;
  }

  .content {
    height: calc(100vh - 49px - 44px - 38px);
  }
</style>
